/**
 * This is the js related to file upload.
 * If you want to add own your file filed, please add it into js file which invokes crtFileUploadWin()
 * 	by formFields.getFileUploadField().
 * 
 * Put your specific file upload logic into js file (fileTrigger.fileUpload).
 * Put your specific file cancel logic into js file (fileTrigger.cancelFileUpload).
 */
 
/* 2013-09-14 return file form. */
	function getFileUploadForm(){		
		var fileForm = Ext.create(EXTJS_FORM_PANEL, {
			id : 'file_form',
			items : formFields.getFileUploadFormField(),
			border : false,
			width : 310,
			autoDestory : true,
			autoHeight : true,			
			bodyStyle : 'padding:15px; background:transparent'						
		});
		
		return fileForm;
	}	
	
/* 2013-09-14 return file window for uploading excel. */
	function crtFileUploadWin(){		
		var file_win = Ext.create(EXTJS_WINDOW, {
			id : 'file_win',
			title : 'File Upload Form',
			items : getFileUploadForm(),
			width : 350,
			border : false,
			bodyStyle : 'padding:5px;',
			plain : true,
			autoHeight : true,
			closable : false,
			autoDestory : true,			
			buttons : [{
				text : 'File Upload',
				handler : fileTrigger.uploadFile
			},{
				text : 'Close',
				handler : fileTrigger.cancelFileUpload
			}],
			buttonAlign : 'center'			
		});
		
		showBodyMask();
		file_win.show();
	}
	
	
	
